#include <stdio.h>

#include <string.h>



int main()

{

int arr[100][100]= {0};

arr[0][0] = 1;

arr[1][0] = 1;

arr[1][1] = 1;

int n = 0, i = 0, j = 0;

scanf("%d", &n);

for (i = 0; i < n; i++)

{

for (j = 0; j <= i; j++)

{

if (j == 0 || j == i)

{

arr[i][j] = 1;

}

else

{

arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];

}

}

}

for (i = 0; i < n; i++)

{

for (j = 0; j <= i; j++)

{

printf("%6d", arr[i][j]);

}

printf("\n");

}

return 0;

}
